/* 
路由配置文件
很重要,关系到我们的路由是否引入成功和我们的路由地址制定是否正确
*/




import { createRouter, createMemoryHistory, createWebHistory } from "vue-router";
import Home from "@/pages/Home.vue";
import News from "@/pages/News.vue";
import About from "@/pages/About.vue";
import Detail from "@/pages/Detail.vue"

const router = createRouter({ 
    history: createWebHistory(),
    routes: [
        {
            path: "/Home",
            component:Home
        }
        , {
            path: "/About",
            component:About
        }
        
        , {
            path: "/News",
            component: News,
            children: [
                {
                    name: "liebiao"
                    , path: "Detail/:id/:title:content",
                    component: Detail
                    ,props:true 
                }
            ]
        }
        
    ]
})


export default router